home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 4283 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.2 KB

  1. Path: news.mindlink.net!news
  2. From: genew@mindlink.bc.ca (Gene Wirchenko)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: division problem
  5. Date: Sat, 03 Feb 1996 04:42:38 GMT
  6. Organization: MIND LINK! - British Columbia, Canada
  7. Message-ID: <4eup7n$f32@fountain.mindlink.net>
  8. References: <31097D77.11AA@rain.org> <26JAN199622082450@erich.triumf.ca> <4eh246$u6h@airdmhor.gen.nz> <4ej4ha$66@fountain.mindlink.net> <DLzvGG.2rn@uns.bris.ac.uk>  <Pine.SOL.3.90.960130150923.21923F-100000@flute> <4etjdj$fil@airdmhor.gen.nz>
  9. NNTP-Posting-Host: line147.nwm.mindlink.net
  10. X-Newsreader: Forte Free Agent 1.0.82
  11.  
  12. gumboot@airdmhor.gen.nz (Simon Hosie) wrote:
  13.  
  14. [snip]
  15.  
  16. >  Hello?  Can anybody hear me?  Ok, let's try again...
  17.  
  18. >#if -3 / 2 == -2
  19. >    celcius = ((fahrenheit - 32) * 10 + 9) / 18;
  20. >#else
  21. >    celcius = ((fahrenheit - 32) * 10 + ((fahrenheit - 32 >= 0) ? 9 : -9)) 
  22. >            / 18;
  23. >#endif
  24.  
  25. >  There.. complete, portable, accurate rounding.
  26.  
  27.      And unreadable too.  Also, accurate rounding would include the
  28. correct spelling of "celsius" <G>.
  29.  
  30. Sincerely,
  31.  
  32. Gene Wirchenko
  33.  
  34. C Pronunciation Guide:
  35.      y=x++;     "wye equals ex plus plus semicolon"
  36.      x=x++;     "ex equals ex doublecross semicolon"
  37.  
  38.